package vno.fux.res.pool
{
	import flash.utils.Dictionary;
	import vno.fux.res.manager.LoadState;
	import vno.fux.res.manager.ITargetHost;

	public class Resource implements ITargetHost
	{
		private var _id:uint;
		protected var _loadStateDic:Dictionary;
		public function Resource(id_:uint)
		{
			_id = id_;
		}
		
		public function get id():uint
		{
			return _id;
		}
		public function set id(value:uint):void
		{
			_id = value;
		}
		public function setLoadState(state:LoadState):void
		{
			_loadStateDic[state.target] = state.state;
		}
		public function create():void
		{
			throw new Error("You should override the function create().");
		}
		public function destroy():void
		{
			throw new Error("You should override the function destroy().");
		}

	}
}